<template>
    <div>
        <h1>正在进行({{$store.getters.doingnum}})</h1>
        <ul class="todo-main">
            <UserItem v-for="Obj in doing" :key="Obj.id" :todo="Obj"/>
        </ul>
        <h1>已经完成({{$store.getters.donenum}})</h1>
        <ul class="todo-main">
            <UserItem v-for="Obj in done" :key="Obj.id" :todo="Obj"/>
        </ul>
    </div>
</template>

<script>
import { mapGetters } from 'vuex';
import UserItem from './UserItem'
export default {
    name:'UserList',
    components:{UserItem},
    computed:{
        ...mapGetters(['doing','done','doingnum','donenum'])
    },
}
</script>

<style>
.todo-main {
    margin-left: 0px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0px;
}

.todo-empty {
    height: 40px;
    line-height: 40px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding-left: 5px;
    margin-top: 10px;
}
h1{
    color: rgb(8, 8, 8);
}
</style>